import request from "./request"

// const api = "/api"
const api = ""

// 登陆
export const Login = (data) => request("post", api + "/login", data);

// 验证用户是否登陆
export const CheckLogin = () => request("get", api + "/checklogin");

// 注销
export const Cancellation = () => request("post", api + "/cancellation")

// 上传头像
export const ImageUpload = (data, options) => request("post", api + "/image/upload", data, options)

// 获取用户信息
export const FindFile = () => request("get", api + "/findfile")

// 修改用户信息
export const Modify = (data) => request("pose", api + "/modifyflie", data)

// 发表文章
export const PublishedArticle = (data) => request("post", api + "/article/published", data)

// 根据条件获取文章(data不传则获取所有)
export const GetArticle = (data) => request("get", api + "/article/get", data)

// 根据条件搜索文章
export const SearchArticle = (data) => request("post", api + "/article/search", data)

// 获取单页的文章
export const GetSinglePage = (data) => request("get", api + "/article/singlepage", data)

// 删除文章
export const DeleteArticle = (data) => request("post", api + "/article/delete", data)

// 发表评论
export const PostComment = (data) => request("post", api + "/comment/postcom", data)

// 发表评论
export const GetComment = (data) => request("get", api + "/comment/getcom", data)

// 发表子评论
export const PostChild = (data) => request("post", api + "/comment/postchild", data)

// 删除评论
export const DeleteComment = (data) => request("post", api + "/comment/deletcom", data)

// 存储未读评论
export const UnreadCom = (data) => request("post", api + "/unread/postlist", data)

// 获取所有未读评论
export const GetreadCom = (data) => request("get", api + "/unread/getlist", data)

// 删除已读评论
export const DeleteRead = (data) => request("post", api + "/unread/delete", data)


// 发布公告
export const ReleaseAnnount = (data) => request("post", api + "/annount/release", data)

// 获取公告
export const GetAnnount = (data) => request("get", api + "/annount/get", data)

// 删除公告
export const DeleteAnnount = (data) => request("post", api + "/annount/delete", data)

// 发布留言
export const PostMessage = (data) => request("post", api + "/message/post", data)

// 获取留言
export const GetMessage = (data) => request("get", api + "/message/get", data)

// 删除留言
export const DeleteMessage = (data) => request("post", api + "/message/delete", data)

// 回复留言
export const PushChild = (data) => request("post", api + "/message/child", data)

// 获取日志的访问密码
export const GetPermissins = (data) => request("get", api + "/log/getpermissins", data)

// 设置日志访问密码
export const SetPermissins = (data) => request("post", api + "/log/setpermissins", data)

// 发表日志
export const PostLog = (data) => request("post", api + "/log/post", data)

// 获取日志
export const GetLog = (data) => request("get", api + "/log/get", data)

// 删除日志
export const DeleteLog = (data) => request("post", api + "/log/delete", data)

//获取所有分类
export const GetCategory = (data) => request("get", api + "/category/get", data)